<?php 
return 

[
    'msg_event'=>
    [
        1=>
        [
            'name'=>'订单下单通知',
            'model'=>'zhtfrontend\models\datas\Orders',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name'
                ],
                'changefields'=>
                [
                    'pay_status'=>
                    [
                        0=>1,
                        1=>2,
                        2=>3
                    ]
                ]
            ],
            'template'=>
            [
                'order_confirm'=>'customer'
            ]
        ],
        2=>
        [
            'name'=>'推荐处理消息',
            'model'=>'common\models\datas\SalesMechanic',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2,
                        1=>3
                    ]
                ]
            ],
            'template'=>
            [
                'testaa'=>'customer'
            ]
        ],
        3=>
        [
            'name'=>'投诉处理消息',
            'model'=>'zhtfrontend\models\datas\Complaint',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2,
                        1=>3
                    ]
                ]
            ],
            'template'=>
            [
                'complaint_handle'=>'customer'
            ]
        ],
        4=>
        [
            'name'=>'申请激活码结果消息通知',
            'model'=>'common\models\datas\Apply',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2,
                        1=>3
                    ]
                ]
            ],
            'template'=>
            [
                'apply_code'=>'onlysms'
            ]
        ],
        5=>
        [
            'name'=>'短信验证码',
            'model'=>'doumiaoduo\telecaptcha\TelecaptchaAction',
            'event'=>'sendtelephonevalidatecode',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'sendTelephoneValidateCode',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'code'
                ]
            ],
            'template'=>
            [
                'captcha'=>'onlysms'
            ]
        ],
        6=>
        [
            'name'=>'开班通知',
            'model'=>'zhtfrontend\models\datas\ClassManage',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'primary_key'=>'class_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name',
                    1=>'start_day',
                    2=>'class_time',
                    3=>'teacher_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>1
                    ]
                ]
            ],
            'template'=>
            [
                'openclass_teacher'=>'goods->arrangement->teacher',
                'group'=>
                [
                    'openclass_user'=>'class_student:class_manage_id->student->customer'
                ]
            ]
        ],
        7=>
        [
            'name'=>'预约成功',
            'model'=>'zhtfrontend\models\datas\OrdersItems',
            'event'=>'afterInsert',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterInsert',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name',
                    1=>'teacher_name'
                ]
            ],
            'template'=>
            [
                'appointment_customer'=>'orders->customer',
                'appointment_teacher'=>'goods_teacher->teacher'
            ]
        ],
        8=>
        [
            'name'=>'开课提前一个月通知',
            'model'=>'zhtfrontend\models\datas\ClassManage',
            'event'=>'remindClassbeforeMonth',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'remindInfo',
            'primary_key'=>'class_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name'
                ]
            ],
            'template'=>
            [
                'openclassmonth_teacher'=>'goods->arrangement->teacher',
                'group'=>
                [
                    'openclassmonth_user'=>'class_student:class_manage_id->student->customer'
                ]
            ]
        ],
        9=>
        [
            'name'=>'奖学金卡激活',
            'model'=>'common\models\datas\CardAttr',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>1
                    ]
                ]
            ],
            'template'=>
            [
                'card_active'=>'customer'
            ]
        ],
        10=>
        [
            'name'=>'订单取消通知',
            'model'=>'zhtfrontend\models\datas\Orders',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2
                    ]
                ]
            ],
            'template'=>
            [
                'order_cancel'=>'customer'
            ]
        ],
        11=>
        [
            'name'=>'学生请假',
            'model'=>'zhtfrontend\models\datas\StudentCheck',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name',
                    1=>'course_name',
                    2=>'course_time',
                    3=>'course_num',
                    4=>'teacher_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2
                    ]
                ]
            ],
            'template'=>
            [
                'customer_leave'=>'student->customer',
                'customer_leave_teacher'=>'class_lesson->class_manage->goods->arrangement->teacher'
            ]
        ],
        12=>
        [
            'name'=>'老师请假',
            'model'=>'zhtfrontend\models\datas\ClassLesson',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_time',
                    1=>'teacher_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2
                    ]
                ]
            ],
            'template'=>
            [
                'group'=>
                [
                    'teacher_leave_customer'=>'class_manage->class_student:class_manage_id->student->customer'
                ],
                'teacher_leave_teacher'=>'class_manage->goods->arrangement->teacher'
            ]
        ],
        13=>
        [
            'name'=>'调课转班',
            'model'=>'zhtfrontend\models\datas\ClassmanageTurn',
            'event'=>'afterInsert',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterInsert',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name',
                    1=>'old_course_name',
                    2=>'new_course_name',
                    3=>'old_teacher_name'
                ]
            ],
            'template'=>
            [
                'transfer_customer'=>'customer',
                'transfer_teacher'=>'old_class_manage->goods->arrangement->teacher'
            ]
        ],
        14=>
        [
            'name'=>'学生退课',
            'model'=>'zhtfrontend\models\datas\StudentCheck',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name',
                    1=>'course_name',
                    2=>'course_time',
                    3=>'course_num',
                    4=>'teacher_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>3
                    ]
                ]
            ],
            'template'=>
            [
                'refundclass_user'=>'student->customer',
                'refundclass_teacher'=>'class_lesson->class_manage->goods->arrangement->teacher'
            ]
        ],
        15=>
        [
            'name'=>'开课提前一周通知',
            'model'=>'zhtfrontend\models\datas\ClassManage',
            'event'=>'remindClassbeforeWeek',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'remindInfo',
            'primary_key'=>'class_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name',
                    1=>'start_day',
                    2=>'teacher_name'
                ]
            ],
            'template'=>
            [
                'group'=>
                [
                    'openclassweek_user'=>'class_student:class_manage_id->student->customer'
                ],
                'openclassweek_teacher'=>'goods->arrangement->teacher'
            ]
        ],
        16=>
        [
            'name'=>'开课提前一天通知',
            'model'=>'zhtfrontend\models\datas\ClassManage',
            'event'=>'remindClassbeforeDay',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'remindInfo',
            'primary_key'=>'class_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name',
                    1=>'start_day',
                    2=>'teacher_name'
                ]
            ],
            'template'=>
            [
                'group'=>
                [
                    'openclassday_user'=>'class_student:class_manage_id->student->customer'
                ],
                'openclassday_teacher'=>'goods->arrangement->teacher'
            ]
        ],
        17=>
        [
            'name'=>'上课打卡',
            'model'=>'zhtfrontend\models\datas\StudentCheck',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'customer_name',
                    1=>'course_name',
                    2=>'course_time',
                    3=>'course_num',
                    4=>'teacher_name',
                    5=>'teache_room'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>1
                    ]
                ]
            ],
            'template'=>
            [
                'punchcard_user'=>'student->customer'
            ]
        ],
        18=>
        [
            'name'=>'上课提醒打卡',
            'model'=>'zhtfrontend\models\datas\ClassLesson',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'primary_key'=>'lesson_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name',
                    1=>'teacher_name',
                    2=>'all_num',
                    3=>'punch_num',
                    4=>'leave_num',
                    5=>'nopunch_info'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>1
                    ]
                ]
            ],
            'template'=>
            [
                'nopunch_user'=>'student_check:class_lesson_id->student->customer',
                'nopunch_teacher'=>'class_manage->goods->arrangement->teacher'
            ]
        ],
        19=>
        [
            'name'=>'结课前一个月通知',
            'model'=>'zhtfrontend\models\datas\ClassManage',
            'event'=>'remindClassendMonth',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'remindInfo',
            'primary_key'=>'class_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name',
                    1=>'start_day',
                    2=>'teacher_name'
                ]
            ],
            'template'=>
            [
                'endclassmon_teacher'=>'goods->arrangement->teacher'
            ]
        ],
        20=>
        [
            'name'=>'结课通知',
            'model'=>'zhtfrontend\models\datas\ClassManage',
            'event'=>'afterUpdate',
            'behavior'=>'common\components\services\msg\MsgBehavior',
            'handler'=>'afterUpdate',
            'primary_key'=>'class_id',
            'extra_declare'=>
            [
                'extrafields'=>
                [
                    0=>'course_name',
                    1=>'end_day',
                    2=>'teacher_name'
                ],
                'changefields'=>
                [
                    'status'=>
                    [
                        0=>2
                    ]
                ]
            ],
            'template'=>
            [
                'group'=>
                [
                    'endclass_user'=>'class_student:class_manage_id->student->customer'
                ],
                'endclass_teacher'=>'goods->arrangement->teacher'
            ]
        ]
    ]
];